---
page_title: "cloudflare_mtls_certificate Resource - Cloudflare"
subcategory: ""
description: |-
  Provides a Cloudflare mTLS certificate resource. These certificates may be used with mTLS enabled Cloudflare services.
---

# cloudflare_mtls_certificate (Resource)

Provides a Cloudflare mTLS certificate resource. These certificates may be used with mTLS enabled Cloudflare services.

## Example Usage

```terraform
resource "cloudflare_mtls_certificate" "example" {
  account_id   = "f037e56e89293a057740de681ac9abbe"
  name         = "example"
  certificates = "-----BEGIN CERTIFICATE-----\nMIIDmDCCAoCgAwIBAgIUKTOAZNj...i4JhqeoTewsxndhDDE\n-----END CERTIFICATE-----"
  private_key  = "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQE...1IS3EnQRrz6WMYA=\n-----END PRIVATE KEY-----"
  ca           = true
}
```
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `account_id` (String) The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
- `ca` (Boolean) Whether this is a CA or leaf certificate. **Modifying this attribute will force creation of a new resource.**
- `certificates` (String) Certificate you intend to use with mTLS-enabled services. **Modifying this attribute will force creation of a new resource.**

### Optional

- `name` (String) Optional unique name for the certificate. **Modifying this attribute will force creation of a new resource.**
- `private_key` (String) The certificate's private key. **Modifying this attribute will force creation of a new resource.**

### Read-Only

- `expires_on` (String) **Modifying this attribute will force creation of a new resource.**
- `id` (String) The ID of this resource.
- `issuer` (String) **Modifying this attribute will force creation of a new resource.**
- `serial_number` (String) **Modifying this attribute will force creation of a new resource.**
- `signature` (String) **Modifying this attribute will force creation of a new resource.**
- `uploaded_on` (String) **Modifying this attribute will force creation of a new resource.**

## Import

Import is supported using the following syntax:

```shell
$ terraform import cloudflare_mtls_certificate.example <account_id>/<mtls_certificate_id>
```
